package com.group02.community.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.group02.community.entity.interaction.ZyComment;
import com.group02.community.entity.interaction.ZyCommunityInteraction;
import com.group02.community.entity.vo.CommentVO;
import com.group02.community.entity.vo.InteractionVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface InteractionMapper extends BaseMapper<ZyCommunityInteraction> {

    IPage<InteractionVO> getAllInteraction(IPage<InteractionVO> page, @Param("interactionVO") InteractionVO interactionVO);

    List<CommentVO> getCommentByInteractionId(String id);

    void updateCommentByInteraction(String interactionId);

    void updateInteractionByInteraction(String interactionId);

    void updateCommentByCommentId(String commentId);

    List<InteractionVO> getAllInteractions();

    void saveComment(@Param("zyComment") ZyComment zyComment);
}
